(function () {
    //查询
    $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm [tag='query']").click(function () {
        var crtTimeStart = $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm [name='crtTimeStart']").val();
        var crtTimeEnd = $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm [name='crtTimeEnd']").val();
        var name = $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm #nameTextbox").textbox("getValue");
        var phone = $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm #phoneTextbox").textbox("getValue");
        var grade = $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm #gradeCombobox").combobox("getValue");
        var type = $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm #typeCombobox").combobox("getValue");

        var vo ={"crtTimeStart": crtTimeStart, "crtTimeEnd": crtTimeEnd, "name": name, "phone": phone, "grade": grade, "type": type};
        $("#csCustomerInformationViewTable"+pageJsTimer+" #csCustomerInformationGrid").datagrid('load', vo);
    });

    //清空
    $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm [tag='reset']").click(function () {
        $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm [name='crtTimeStart']").val("");
        $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm [name='crtTimeEnd']").val("");
        $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm #nameTextbox").textbox("setValue", "");
        $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm #phoneTextbox").textbox("setValue", "");
        $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm #gradeCombobox").combobox("setValue",'');
        $("#csCustomerInformationViewQuery"+pageJsTimer+" #queryForm #typeCombobox").combobox("setValue",'');

        $("#csCustomerInformationViewTable"+pageJsTimer+" #csCustomerInformationGrid").datagrid('load', {});
    });
})();